<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Edit Person: ${existPerson.firstName}</title>
</head>
<body>
	<div>
		<h1>Edit Person: ${existPerson.firstName}</h1>
		<c:url var="saveUrl" value="/main/persons/edit?id=${existPerson.id}" />
		<form:form modelAttribute="existPerson" method="POST"
			action="${saveUrl}">
			<table>
				<tr>
					<td><form:label path="id">Id:</form:label></td>
					<td><form:input path="id" disabled="true" /></td>
				</tr>

				<tr>
					<td><form:label path="firstName">First Name:</form:label></td>
					<td><form:input path="firstName" /></td>
				</tr>

				<tr>
					<td><form:label path="lastName">Last Name</form:label></td>
					<td><form:input path="lastName" /></td>
				</tr>

				<tr>
					<td><form:label path="age">Age</form:label></td>
					<td><form:input path="age" /></td>
				</tr>


				<tr>
					<td><form:label path="address">Address</form:label></td>
					<td><form:input path="address" /></td>
				</tr>
				<tr>
					<td></td>
					<td><input type="submit" value="Save"></td>
				</tr>
			</table>
		</form:form>
	</div>
</body>
</html>